module.exports = angular => {
  return [
    {
      name: 'login',
      url: '/login',
      template: require('modules/login/login.html'),
      controller: 'loginCtrl',
      resolve: {
        '': ($q, $ocLazyLoad) => {
          return $q(resolve => {
            require.ensure([], () => {
              let loginModule = require('modules/login/login-module.js')(angular);
              $ocLazyLoad.load({name: 'loginModule'});
              resolve(loginModule);
            })
          })
        }
      },
    },
    {
      name: 'dashboard',
      url: '/dashboard',
      template: require('modules/dashboard/dashboard.html'),
      controller: 'dashboardCtrl',
      resolve: {
        '': ($q, $ocLazyLoad) => {
          return $q(resolve => {
            require.ensure([], () => {
              let dashboardModule = require('modules/dashboard/dashboard-module.js')(angular);
              $ocLazyLoad.load({name: 'dashboardModule'});
              resolve(dashboardModule);
            })
          })
        }
      },
    },
    {
      name: 'main',
      url: '/main',
      template: require('modules/press/main.html'),
      controller: 'mainCtrl',
      resolve: {
        '': ($q, $ocLazyLoad) => {
          return $q(resolve => {
            require.ensure([], function () {
              let mainModule = require('modules/press/main-module.js')(angular);
              $ocLazyLoad.load({name: 'mainModule'});
              resolve(mainModule);
            })
          })
        }
      },
    },
    {
      name: 'content',
      url: '/content/:infoCode?:pattern&:appId',
      params: {
        'infoCode': null,
        'pattern': null,
        'appId': null
      },
      template: require('modules/press/content.html'),
      controller: 'contentCtrl',
      resolve: {
        '': ($q, $ocLazyLoad) => {
          return $q(resolve => {
            require.ensure([], () => {
              let contentModule = require('modules/press/content-module.js')(angular);
              $ocLazyLoad.load({name: 'contentModule'});
              resolve(contentModule);
            })
          })
        }
      },
    }
  ];
};
